<%@ page import="javax.naming.InitialContext" %>
<%@ page import="javax.naming.Context" %><%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2021/8/6
  Time: 10:57
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
  <head>
    <title>index</title>
  </head>
  <body>
    <%
        Context ctx = new InitialContext();
        String str = (String) ctx.lookup("java:comp/env/jndiName");
        out.print(str);
    %>
    <br/>
    <a href="JNDIServlet">JNDIServlet</a>
  </body>
</html>
